package crotrol;

import entity.NewsCategory;
import mysql.BaseDao;
import mysql.NewsCategoryDao;

public class NewsCategoryControl extends BaseDao implements NewsCategoryDao {
    @Override
    public void deleteCategory(NewsCategory newsCategory) {
        String sql = "delete from news_category where id=?";
        Object[] params = {newsCategory.getId()};
        int i= this.executeUpdate(sql,params);
        if (i>0){
            System.out.println("删除成功");
        }else {
            System.out.println("删除失败");
        }
    }
}
